package com.example.demo5.Service.Impl;

import com.example.demo5.dao.StudentDao;
import com.example.demo5.jopo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentService implements com.example.demo5.Service.StudentService {
    @Autowired
    private StudentDao studentDao;

    public List<Student> findAll() {
        return studentDao.findAll();
    }

    public void add(Student student) {
        studentDao.add(student);
    }



    public Student findById(Integer id) {
        return studentDao.findById(id);
    }

    public void del(Integer id) {
        studentDao.del(id);
    }

    public void edit(Student student) {
        studentDao.edit(student);
    }
}
